package com.sz.designpattern.behavior11.ob;

public abstract class Observer {
    private Observable observable;

    public Observer(Observable observable) {
        this.observable = observable;
        this.observable.addObserver(this);
    }

    public abstract void update();

    public final void unregister(){
        observable.removeObserver(this);
    }
}
